package model

import (
	"gin-server/global"
)

type User struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

func (User) TableName() string {
	return "user"
}

func GetUserTest(id int) (User, error) {
	var user User
	err := global.DBLink.Where("id = ?", id).First(&user).Error
	return user, err
}
